<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>wsgiwebapi.application</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="wsgiwebapi-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="../index.html">WSGIWebAPI</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="wsgiwebapi-module.html">Package&nbsp;wsgiwebapi</a> ::
        Module&nbsp;application
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="wsgiwebapi.application-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module application</h1><span class="codelink"><a href="wsgiwebapi.application-pysrc.html">source&nbsp;code</a></span><br /><br />
Create a WSGI application providing a web API.<br /><br />

<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Functions</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="handle_validation_error"></a><span class="summary-sig-name">handle_validation_error</span>(<span class="summary-sig-arg">err</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="wsgiwebapi.application-pysrc.html#handle_validation_error">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="wsgiwebapi.application-module.html#make_application" class="summary-sig-name">make_application</a>(<span class="summary-sig-arg">urls</span>,
        <span class="summary-sig-arg">autodoc</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">validation_error_handler</span>=<span class="summary-sig-default">handle_validation_error</span>,
        <span class="summary-sig-arg">logger</span>=<span class="summary-sig-default">None</span>)</span><br />
      Make a web application for a given set of URLs.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="wsgiwebapi.application-pysrc.html#make_application">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="wsgiwebapi.application-module.html#make_server" class="summary-sig-name">make_server</a>(<span class="summary-sig-arg">app</span>,
        <span class="summary-sig-arg">bind_addr</span>,
        <span class="summary-sig-arg">*args</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Make a server for an application.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="wsgiwebapi.application-pysrc.html#make_server">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="make_application"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">make_application</span>(<span class="sig-arg">urls</span>,
        <span class="sig-arg">autodoc</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">validation_error_handler</span>=<span class="sig-default">handle_validation_error</span>,
        <span class="sig-arg">logger</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="wsgiwebapi.application-pysrc.html#make_application">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Make a web application for a given set of URLs.</p>
<ul class="rst-simple">
<li><code class="link">urls</code> is a dict of urls to support: keys are url components, values are
either sub dictionaries, or callables.</li>
<li><code class="link">logger</code> is a callable which returns a Logger.  When the application
object returned is instantiated, it will call this callable, and use the
returned object for logging.</li>
</ul>
<p>FIXME - document the other parameters to this function.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="make_server"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">make_server</span>(<span class="sig-arg">app</span>,
        <span class="sig-arg">bind_addr</span>,
        <span class="sig-arg">*args</span>,
        <span class="sig-arg">**kwargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="wsgiwebapi.application-pysrc.html#make_server">source&nbsp;code</a></span>&nbsp;
    </td>
  </table>
  
  <p>Make a server for an application.</p>
<p>This uses CherryPy's standalone WSGI server.  The first argument is the
WSGI application to run; all subsequent arguments are passed directly to
the server.  The CherryPyWSGIServer is accessible as
wsgiwebapi.cpwsgiserver: see the documentation in that module for calling
details.</p>
<p>Note that you will always need to set the bind_addr parameter; this is a
(host, port) tuple for TCP sockets, or a filename for UNIX sockets.  The
host part may be set to '0.0.0.0' to listen on all active IPv4 interfaces
(or similarly, '::' to listen on all active IPv6 interfaces).</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="wsgiwebapi-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="../index.html">WSGIWebAPI</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0beta1 on Tue Feb  3 09:21:34 2009
    </td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
